{include file="common/head"}
<head>
<title>服务场所管理</title>

<style>
</style>
</head>
<body >
<div class="container-fluid">
    <div class="row">
        <div class="col-4" style="text-align: left;line-height: 50px;font-size: 2rem;" >
            服务场所管理【{$list.total}】
        </div>
        <div class="col-8">    
        </div>
    </div>
    <table class="table table-sm table-hover table-striped" style="width: 100%;">
        <thead style="">
            <th>序号</th>
            <th>名称</th>
            <th>详细地址</th>
            <th>归属人</th>
            <th>联络人</th>
            <th>联络手机号</th>
            <th>图片</th>
            <th>录入</th>
            <th>状态</th>
            <th>
                <button type="button" class="btn btn-sm btn-primary" >
                    <a href="/index.php/address/add" alt="新增" style="color:white;"><span class="bi-plus-lg"></span></a>
                </button>                
            </th>
        </thead>
        <tbody>
            {foreach $list['data'] as $k=>$kv}
            <tr>
                <td>{$k+1}</td>
                <td>{$kv['title']}</td>
                <td>{$kv['address']}</td>
                <td>{$kv['customer_id']}</td>
                <td>{$kv['contact']}</td>
                <td>{$kv['mobile']}</td>
                <td><img class="goods_image" src="{$kv['imgs']}" style="width:40px;border:1px solid #ccc;" /></td>
                <td>{$kv['creater']}</td>
                <td>{$kv['create_time']|date='Y-m-d H:i:s'}</td>
                {if $kv['status']==1}
                    <td>{$kv['status_name']}</td>
                {else if $kv['status']==2}
                    <td style="text-decoration:line-through;color:red;">{$kv['status_name']}</td>
                {/if}
                <td>
                    <a href="/index.php/address/edit/id/{$kv['id']}">
                        <button tyle="button" class="btn btn-sm btn-info"><span class="bi-pencil"></span></button>
                    </a>
                </td>
            </tr>
            {/foreach}
        
        </tbody>    
    </table>

    {include file="common/pagination"}



     
</div>

</body>

<script type="text/javascript">
  $(document).ready(function(){    
    //显示图片


    $(".goods_image").on('click',function(){
        var img = $(this).attr('src');
        if(!img.trim()) return;

        layer.open({
          type: 1,
          title:'',
          closeBtn: 0, //不显示关闭按钮
         // anim: 1,
          time: 5*1000,
          shadeClose: true, //开启遮罩关闭              
          skin: 'layui-layer-rim', 
          content: "<img src='"+img+"' style='width:100%'>"
        });
    })
})
</script>


</body>
</html>
